<div class="row-fluid">
    <div class="span12">
        <div class="grid simple">
            <div class="grid-title no-border">
                <h4></h4>
            </div>
            <form method="post">
                <div class="grid-body no-border">   
                    <?php foreach ($models as $modelID): $model = NewModels::model()->findByPk($modelID); ?>
                        <div style="border: 1px solid #4E7285; padding: 10px;">                        
                            <div class="form">  
                                <div class="control-group span5">
                                    <label class="control-label">Категория</label>
                                    <div class="controls">
                                        <?php echo CHtml::dropDownList('category[]', $model->cat_id, CHtml::listData(Page::model()->findAll('"pageType" = \'category\' ORDER BY "pageSort"'), 'pageId', 'pageTitle')); ?>                                                          
                                    </div>
                                </div><br /><br /><br /><br />
                                <div class="control-group">
                                    <label class="control-label required">Бренд <span class="required">*</span></label>
                                    <div class="controls">
                                        <input type="text" class="span5" value="<?php echo $model->brand_title; ?>" maxlength="255" name="brand[]">
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label required">Название <span class="required">*</span></label>
                                    <div class="controls">
                                        <input type="text" class="span5" value="<?php echo $model->model_test_title; ?>" maxlength="255" name="name[]">
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label required">Адрес <span class="required">*</span></label>
                                    <div class="controls">
                                        <input type="text" class="span5" value="<?php echo getUrl::cleanString($model->cat_title) . '/' . getUrl::cleanString($model->brand_title) . '/' . getUrl::cleanString($model->model_test_title); ?>" maxlength="255" name="url[]">
                                    </div>
                                </div>
                                <img src="<?php echo $model->model_image; ?>">
                            </div>
                        </div><br />
                        <input type="hidden" name="image[]" value="<?php echo $model->model_image; ?>">
                        <input type="hidden" name="cat_title[]" value="<?php echo $model->cat_title; ?>">
                        <input type="hidden" name="yandex_id[]" value="<?php echo $model->model_yandex_id; ?>">
                        <input type="hidden" name="yandex_popular[]" value="<?php echo $model->model_popular; ?>">
                        <input type="hidden" name="yandex_price[]" value="<?php echo $model->model_price; ?>">
                        <input type="hidden" name="models[]" value="<?php echo $model->row_id; ?>">
                    <?php endforeach; ?>
                    <br />
                    <br />
                    <input type="submit" value="Добавить" id="marge" class="btn btn-primary btn-large">
                </div>
            </form>  
        </div>	
    </div>
</div>